//
// Created by antler on 2018/12/6.
//

#ifndef LUA_POINT_H
#define LUA_POINT_H

#define CLASSNAME_POINT "Point"
#define USERTYPE_POINT "Point"

class Point {
public:
    static Point ZERO;
    static Point INVALID;

public:
    static Point *create();

    static Point *createWith(int x, int y);

    static Point *createWith(const Point &point);

    Point();

    Point(int x, int y);

    Point operator+(const Point &point) const;

    Point operator-(const Point &point) const;

    Point operator*(int ratio) const;

    Point operator/(int ratio) const;

    bool operator==(const Point &point) const;

    Point operator-() const;

public:
    int x;
    int y;
};


#endif //LUA_POINT_H
